-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}', '1', '1', '/${model.modulePackage}/${model.modelL}', 'C', '0', '${model.modulePackage}:${model.modelL}:view', '#', 'admin', '${date}', 'admin', '${date}', '${model.comment}菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}查询', @parentId, '1',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:list',         '#', 'admin', '${date}', 'admin', '${date}', '');

insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}新增', @parentId, '2',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:add',          '#', 'admin', '${date}', 'admin', '${date}', '');

insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}修改', @parentId, '3',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:edit',         '#', 'admin', '${date}', 'admin', '${date}', '');

insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}删除', @parentId, '4',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:remove',       '#', 'admin', '${date}', 'admin', '${date}', '');
 
insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}详情', @parentId, '4',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:detail',       '#', 'admin', '${date}', 'admin', '${date}', '');
 
insert into sys_menu  (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${model.comment}导出', @parentId, '4',  '#',  'F', '0', '${model.modulePackage}:${model.modelL}:export',       '#', 'admin', '${date}', 'admin', '${date}', '');
 
